$(function () {
    FastClick.attach(document.body);
    $('nav .right .search input').keyup(function (e) {
        var e = e || window.event;
        if (e.keyCode == 13) {
            search();
        }
    })
});

function toggleNavMenu() {
    $('nav .right').slideToggle('fast');
}

function search() {
    var search_data = $("#key-ipt").val().trim() || '安信花';
    location.href = '/app/search_data/' + search_data;
}